#include <iostream>

using namespace std;

int main() {
    char ch;
    cin >> ch;
    if (ch >= 65 && ch <= 90) {
        ch += 32;
        cout << ch << endl;
    } else if (ch >= 97 && ch <= 122) {
        ch -= 32;
        cout << ch << endl;
    } else {
        cout << "invalid input" << endl;
    }
    system("pause");
    return 0;
}